<template>
    <table border>
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>头像</th>
        </tr>
        <tr v-for="(item,index) in list" :key="item.id">
            <td>{{ index+1 }}</td>
            <td>{{ item.name }}</td>
            <td>{{ item.age }}</td>
            <td>
                <!-- {{item.headImgUrl}} -->
                <!-- 作用域插槽 row自定义名字 -->
                <slot :row="item.headImgUrl"></slot>
            </td>
        </tr>
    </table>
</template>

<script>
export default {
    props: {
        list: {
            type: Array
        }
    }
}
</script>

<style>

</style>